home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / UTIL / SYS / PIPE / pipe_help < prev   
Text File  |  1992-02-28  |  3KB  |  92 lines

  1. PipeHelp
  2.  
  3. Help file for Pipe 2.0
  4.  
  5. Pipe works now correctly if stdout is redirected.
  6. Pipe knows about the CLI commands, it redirects the
  7. output of CLI commands right.
  8. Pipe is now able to remove workfiles left by an earlier
  9. call of pipe which failed.
  10.  
  11. Usage:
  12.  
  13. pipe command1 | command2 | ... commandn
  14.  
  15. where command is either a program which can be called
  16. with run or a CLI-command. If it is a CLI-command it 
  17. MUST begin with a *.
  18. As CLI-commands do not accept any input (most of them)
  19. a CLI-command works only right as the first or the last
  20. command.
  21.  
  22. Examples:
  23.   grep pattern file -- this searches "pattern" in file
  24.                        and prints matches
  25.  
  26. pipe *modules | grep mouse -- find all modules with 
  27.                               mouse in their name.
  28. pipe *fontcat | grep helvetica -- find all available
  29.                                   helvetica fonts
  30.  
  31. The only command at the end which makes sence to me is
  32. *count.
  33.  
  34. pipe grep test InFile | *count -- counts the chars belonging
  35.                                   to lines of InFile having
  36.                                   the pattern test on them.
  37.  
  38. Well, I do not know if this is realy usefull!
  39. I will explaine how it workes, so you may find usefull operations.
  40. A command not at the front and not at hte end of the sequence
  41. looks like this when it is executed:
  42.  
  43.    command Argumentlist < pipe_in > pipe_out
  44.  
  45. pipe_in is the output of the last command.
  46. pipe_out is the name of the new outputfile.
  47.  
  48. If command returns with siuccess pipe_in is removed and
  49. pipe_out is renamed to pipe_in.
  50.  
  51. If command is a CLI-command (recognized by the leading *)
  52. it looks like this:
  53.  
  54.    *command Argumentlist pipe_in { > pipe_out }
  55.  
  56. pipe_in is added to the Argumentlist an the output is redirected
  57. in braces.
  58. This makes only sence on very few commands :-(
  59.  
  60.  
  61. ==================================================================
  62.  
  63.    What I probably will do for further implementations is this:
  64.  
  65.    If there is a *command in the middle or at the end of
  66.    a commandsequence I call this command for each line of
  67.    output produced by the earlier command.
  68.  
  69.    EG.
  70.  
  71.    pipe cat | grep list | copy %s ^.%s
  72.    copy all files in the CSD which have a "list" in their name one
  73.    directory up. 
  74.    
  75.    pipe *modules | grep Mem | rmkill %s
  76.    rmkill all modules with "mem" in their name.
  77.  
  78. ==================================================================
  79.  
  80. CAT concatenates its argumentfiles to stdout.
  81. So cat > afile reads from stdin and writes to stdout.
  82. cat aFile types aFile to stdout.
  83. cat file1 file2 file3 > outfile concats file one to three to outfile.
  84.  
  85. ==================================================================
  86.  
  87. angelo@ira.uka.de                   Angelo Schneider
  88. angelo schneider@ka.maus.de         Edelsheimstr. 1
  89.                                     7500 Karlsruhe 1
  90.                                     voice:  0721/607840
  91.  
  92.